<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<body>
	<s:form action="role">
			<table border="1">
				<s:hidden name="role.id" />
				<s:iterator value="modules" id="module">
					<s:if test="%{#module.level==1}">
						<tr>
							<td>
								<s:checkbox name="#module.haveRole" theme="simple" fieldValue="%{#module.id}"/>
							</td>
							<td>
								<s:property value="#module.title" />
							</td>
							<td>
								<s:property value="#module.murl" />
							</td>
						</tr>
						<s:iterator value="#module.modules" id="sonModule">
							<s:if test="%{#sonModule.level==2 && #sonModule.parent.id==#module.id}">
								<tr>
									<td></td>
									<td>
										<s:checkbox name="#sonModule.haveRole"  theme="simple" fieldValue="%{#sonModule.id}"/>
									</td>
									<td>
										<s:property value="#sonModule.title" />
									</td>
									<td>
										<s:property value="#sonModule.murl" />
									</td>
								</tr>
							</s:if>
						</s:iterator>
					</s:if>
				</s:iterator>
				<tr><td colspan="4"><s:submit value="保存" method="saveMenus" theme="simple" /></td></tr>
			</table>
	</s:form>
	</body>
</html>